package cn.com.pc.content.vo;

import cn.com.pc.content.domain.article.Article;
import cn.com.pc.content.domain.video.Video;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.beans.BeanUtils;

/**
 * 视频视图
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString(callSuper = true)
public class VideoViewVO extends Video {

    private String viewType;
    private String view;

    public static VideoViewVO from(Video video, String viewType, String view) {
        VideoViewVO videoViewVO = new VideoViewVO();
        BeanUtils.copyProperties(video, videoViewVO);
        videoViewVO.setViewType(viewType);
        videoViewVO.setView(view);
        return videoViewVO;
    }
}
